package rad.framework.mda.generator.template.main.application.metainf;

import org.eclipse.uml2.uml.Model;

public class JbossApp
{
  protected static String nl;
  public static synchronized JbossApp create(String lineSeparator)
  {
    nl = lineSeparator;
    JbossApp result = new JbossApp();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
  protected final String TEXT_1 = "<!DOCTYPE jboss-app PUBLIC \"-//JBoss//DTD J2EE Application 1.4//EN\"" + NL + "         \"http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd\">" + NL + "<jboss-app>" + NL + "" + NL + "\t<module-order>strict</module-order>" + NL + "\t" + NL + "\t<loader-repository> " + NL + "\t\tseam.jboss.org:loader=";
  protected final String TEXT_2 = ".ear" + NL + "\t\t<loader-repository-config>" + NL + "\t\t\tjava2ParentDelegation=false" + NL + "\t\t</loader-repository-config>" + NL + "\t</loader-repository>" + NL + "\t" + NL + "</jboss-app>";

  public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
    

    Model uml2Model = (Model) argument;
    stringBuffer.append(TEXT_1);
    stringBuffer.append(uml2Model.getName());
    stringBuffer.append(TEXT_2);
    return stringBuffer.toString();
  }
}
